﻿using System;
using System.ComponentModel;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace DataGridTest.Models
{
    public class ProvinceModel : INotifyPropertyChanged
    {
        private int _number;
        private string _classes;
        private string _province;
        private string _legal;
        private string _illegal;
        private string _unknown;

        public int Number
        {
            get { return _number; }
            set
            {
                _number = value;
                OnPropertyChanged("Number");
            }
        }

        public string Classes
        {
            get { return _classes; }
            set
            {
                _classes = value;
                OnPropertyChanged("Classes");
            }
        }

        public string Province
        {
            get { return _province; }
            set
            {
                _province = value;
                OnPropertyChanged("Province");
            }
        }

        public string Legal
        {
            get { return _legal; }
            set
            {
                _legal = value;
                OnPropertyChanged("Legal");
            }
        }

        public string Illegal
        {
            get { return _illegal; }
            set
            {
                _illegal = value;
                OnPropertyChanged("Illegal");
            }
        }

        public string Unknown
        {
            get { return _unknown; }
            set
            {
                _unknown = value;
                OnPropertyChanged("Unknown");
            }
        }

        #region 变更通知
        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(string pPropertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(pPropertyName));
            }
        }
        #endregion
    }
}
